#include "stdafx.h"
#include <string>
#include <iostream>
#include <windows.h>

#include <Inklude/ikCString.h>
#include <Inklude/ikCSharedMemory.h>

using namespace Inklude;
using namespace std;

int main(int argc, char** argv)
{
    ikCSharedMemory cmem;
    cmem.CreateMemory(Inklude::ikCString("abcdefg"),300214);

    char buffer[512];

    while (true)
    {
        if (cmem.IsNewlyWritten())
        {
            cmem.ReadMemory(buffer, 100, 0);
            cmem.ReadMemory(buffer+200, 100, 0);

            printf(buffer);
            printf(buffer+200);
            printf("\n");
        }
        //Sleep(100);
    }
}

